<!DOCTYPE html PUBLIC '-//WAPFORUM//DTD XHTML Mobile 1.1//EN' 'http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd'>
<html>
<head>
<style ='text/css'>input{font-size:20px;font-weight:bold;}</style>
<script type="text/javascript">
var responseHttpObject = new XMLHttpRequest();
function sendCommand(target, handler) {
	var xmlHttpObject = new XMLHttpRequest();
	xmlHttpObject.open('GET', target);
	xmlHttpObject.send(null);
	var playButton = document.getElementById('playButton');
	if(target == 'play'){
		playButton.value = '||';
		playButton.onclick = function(){sendCommand('pause');};
	}
	if(target == 'pause'){
		playButton.value = '>';
		playButton.onclick = function(){sendCommand('play');};
	}
	if(target == 'prev' || target == 'next'){
		contextChanged();
	}
}
function contextChanged(){
	var now = new Date();
	responseHttpObject.open('GET', 'currentSong');
	responseHttpObject.onreadystatechange = handleResponse;
	responseHttpObject.send(null);
}
function handleResponse(){
	document.getElementById('currentSong').firstChild.nodeValue=responseHttpObject.responseText;
	document.getElementById('cover').src = 'cover.jpg?' + now.getTime();
}
</script>
</head>
<title>Rhythmbox Remote Control</title>
<body>
<div id='wrapper' style='position:relative;width:250px;margin-left:auto;margin-right:auto;text-align:center;font-family:sans-serif;'>
